//
//  BaseTableViewController.m
//  CatMusic
//
//  Created by dllo on 15/4/21.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "BaseTableViewController.h"
#import "BaseTableViewCell.h"

@interface BaseTableViewController ()

@end

@implementation BaseTableViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
//    self.view.backgroundColor = [UIColor purpleColor];
    // Do any additional setup after loading the view.
    [self creatBaseTableView];
    
}

- (void)creatBaseTableView
{
    self.baseTableView = [[UITableView alloc]initWithFrame:[[UIScreen mainScreen]bounds]];
    [self.view addSubview:self.baseTableView];
    self.baseTableView.delegate = self;
    self.baseTableView.backgroundColor = [UIColor clearColor];
    self.baseTableView.dataSource = self;
    self.baseTableView.tag = 10000;
    
    
    [self.baseTableView registerClass:[BaseTableViewCell class] forCellReuseIdentifier:@"cell"];
    
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    BaseTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    cell.BaseSongNameLabel.text = @"11";
    //    cell.BaseImageView.image = [UIImage imageNamed:@"iconfont-yinle-3.png"];
    cell.BaseSingerNameLabel.text = @"222";
    cell.baseNumberLabel.text = [NSString stringWithFormat:@"%ld" , (long)indexPath.row +1 ];
//    cell.backgroundColor = [UIColor clearColor];
    return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return 60;
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
